3.1.24 \(\int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx\) [24]

Optimal. Leaf size=270 \[ -\frac {3 d^3 e^{-2 i e-2 i f x}}{16 a^2 f^4}-\frac {3 d^3 e^{-4 i e-4 i f x}}{512 a^2 f^4}-\frac {3 i d^2 e^{-2 i e-2 i f x} (c+d x)}{8 a^2 f^3}-\frac {3 i d^2 e^{-4 i e-4 i f x} (c+d x)}{128 a^2 f^3}+\frac {3 d e^{-2 i e-2 i f x} (c+d x)^2}{8 a^2 f^2}+\frac {3 d e^{-4 i e-4 i f x} (c+d x)^2}{64 a^2 f^2}+\frac {i e^{-2 i e-2 i f x} (c+d x)^3}{4 a^2 f}+\frac {i e^{-4 i e-4 i f x} (c+d x)^3}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d} \]

[Out]

-3/16*d^3*exp(-2*I*e-2*I*f*x)/a^2/f^4-3/512*d^3*exp(-4*I*e-4*I*f*x)/a^2/f^4-3/8*I*d^2*exp(-2*I*e-2*I*f*x)*(d*x
+c)/a^2/f^3-3/128*I*d^2*exp(-4*I*e-4*I*f*x)*(d*x+c)/a^2/f^3+3/8*d*exp(-2*I*e-2*I*f*x)*(d*x+c)^2/a^2/f^2+3/64*d
*exp(-4*I*e-4*I*f*x)*(d*x+c)^2/a^2/f^2+1/4*I*exp(-2*I*e-2*I*f*x)*(d*x+c)^3/a^2/f+1/16*I*exp(-4*I*e-4*I*f*x)*(d
*x+c)^3/a^2/f+1/16*(d*x+c)^4/a^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.20, antiderivative size = 270, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3810, 2207, 2225} \begin {gather*} -\frac {3 i d^2 (c+d x) e^{-2 i e-2 i f x}}{8 a^2 f^3}-\frac {3 i d^2 (c+d x) e^{-4 i e-4 i f x}}{128 a^2 f^3}+\frac {3 d (c+d x)^2 e^{-2 i e-2 i f x}}{8 a^2 f^2}+\frac {3 d (c+d x)^2 e^{-4 i e-4 i f x}}{64 a^2 f^2}+\frac {i (c+d x)^3 e^{-2 i e-2 i f x}}{4 a^2 f}+\frac {i (c+d x)^3 e^{-4 i e-4 i f x}}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}-\frac {3 d^3 e^{-2 i e-2 i f x}}{16 a^2 f^4}-\frac {3 d^3 e^{-4 i e-4 i f x}}{512 a^2 f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^3/(a + I*a*Tan[e + f*x])^2,x]

[Out]

(-3*d^3*E^((-2*I)*e - (2*I)*f*x))/(16*a^2*f^4) - (3*d^3*E^((-4*I)*e - (4*I)*f*x))/(512*a^2*f^4) - (((3*I)/8)*d
^2*E^((-2*I)*e - (2*I)*f*x)*(c + d*x))/(a^2*f^3) - (((3*I)/128)*d^2*E^((-4*I)*e - (4*I)*f*x)*(c + d*x))/(a^2*f
^3) + (3*d*E^((-2*I)*e - (2*I)*f*x)*(c + d*x)^2)/(8*a^2*f^2) + (3*d*E^((-4*I)*e - (4*I)*f*x)*(c + d*x)^2)/(64*
a^2*f^2) + ((I/4)*E^((-2*I)*e - (2*I)*f*x)*(c + d*x)^3)/(a^2*f) + ((I/16)*E^((-4*I)*e - (4*I)*f*x)*(c + d*x)^3
)/(a^2*f) + (c + d*x)^4/(16*a^2*d)

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 3810

Int[((c_.) + (d_.)*(x_))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandIntegrand[(c
 + d*x)^m, (1/(2*a) + E^(2*(a/b)*(e + f*x))/(2*a))^(-n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
+ b^2, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx &=\int \left (\frac {(c+d x)^3}{4 a^2}+\frac {e^{-2 i e-2 i f x} (c+d x)^3}{2 a^2}+\frac {e^{-4 i e-4 i f x} (c+d x)^3}{4 a^2}\right ) \, dx\\ &=\frac {(c+d x)^4}{16 a^2 d}+\frac {\int e^{-4 i e-4 i f x} (c+d x)^3 \, dx}{4 a^2}+\frac {\int e^{-2 i e-2 i f x} (c+d x)^3 \, dx}{2 a^2}\\ &=\frac {i e^{-2 i e-2 i f x} (c+d x)^3}{4 a^2 f}+\frac {i e^{-4 i e-4 i f x} (c+d x)^3}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}-\frac {(3 i d) \int e^{-4 i e-4 i f x} (c+d x)^2 \, dx}{16 a^2 f}-\frac {(3 i d) \int e^{-2 i e-2 i f x} (c+d x)^2 \, dx}{4 a^2 f}\\ &=\frac {3 d e^{-2 i e-2 i f x} (c+d x)^2}{8 a^2 f^2}+\frac {3 d e^{-4 i e-4 i f x} (c+d x)^2}{64 a^2 f^2}+\frac {i e^{-2 i e-2 i f x} (c+d x)^3}{4 a^2 f}+\frac {i e^{-4 i e-4 i f x} (c+d x)^3}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}-\frac {\left (3 d^2\right ) \int e^{-4 i e-4 i f x} (c+d x) \, dx}{32 a^2 f^2}-\frac {\left (3 d^2\right ) \int e^{-2 i e-2 i f x} (c+d x) \, dx}{4 a^2 f^2}\\ &=-\frac {3 i d^2 e^{-2 i e-2 i f x} (c+d x)}{8 a^2 f^3}-\frac {3 i d^2 e^{-4 i e-4 i f x} (c+d x)}{128 a^2 f^3}+\frac {3 d e^{-2 i e-2 i f x} (c+d x)^2}{8 a^2 f^2}+\frac {3 d e^{-4 i e-4 i f x} (c+d x)^2}{64 a^2 f^2}+\frac {i e^{-2 i e-2 i f x} (c+d x)^3}{4 a^2 f}+\frac {i e^{-4 i e-4 i f x} (c+d x)^3}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}+\frac {\left (3 i d^3\right ) \int e^{-4 i e-4 i f x} \, dx}{128 a^2 f^3}+\frac {\left (3 i d^3\right ) \int e^{-2 i e-2 i f x} \, dx}{8 a^2 f^3}\\ &=-\frac {3 d^3 e^{-2 i e-2 i f x}}{16 a^2 f^4}-\frac {3 d^3 e^{-4 i e-4 i f x}}{512 a^2 f^4}-\frac {3 i d^2 e^{-2 i e-2 i f x} (c+d x)}{8 a^2 f^3}-\frac {3 i d^2 e^{-4 i e-4 i f x} (c+d x)}{128 a^2 f^3}+\frac {3 d e^{-2 i e-2 i f x} (c+d x)^2}{8 a^2 f^2}+\frac {3 d e^{-4 i e-4 i f x} (c+d x)^2}{64 a^2 f^2}+\frac {i e^{-2 i e-2 i f x} (c+d x)^3}{4 a^2 f}+\frac {i e^{-4 i e-4 i f x} (c+d x)^3}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.02, size = 473, normalized size = 1.75 \begin {gather*} \frac {\sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (\left (4 i c^3 f^3+6 c^2 d f^2 (1+2 i f x)+6 c d^2 f \left (-i+2 f x+2 i f^2 x^2\right )+d^3 \left (-3-6 i f x+6 f^2 x^2+4 i f^3 x^3\right )\right ) \cos (2 f x)+\frac {1}{32} \left (32 i c^3 f^3+24 c^2 d f^2 (1+4 i f x)+12 c d^2 f \left (-i+4 f x+8 i f^2 x^2\right )+d^3 \left (-3-12 i f x+24 f^2 x^2+32 i f^3 x^3\right )\right ) \cos (4 f x) (\cos (2 e)-i \sin (2 e))+f^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right ) (\cos (2 e)+i \sin (2 e))+\left (4 c^3 f^3+6 c^2 d f^2 (-i+2 f x)+6 c d^2 f \left (-1-2 i f x+2 f^2 x^2\right )+d^3 \left (3 i-6 f x-6 i f^2 x^2+4 f^3 x^3\right )\right ) \sin (2 f x)+\frac {1}{32} \left (32 c^3 f^3+24 c^2 d f^2 (-i+4 f x)+12 c d^2 f \left (-1-4 i f x+8 f^2 x^2\right )+d^3 \left (3 i-12 f x-24 i f^2 x^2+32 f^3 x^3\right )\right ) (\cos (2 e)-i \sin (2 e)) \sin (4 f x)\right )}{16 f^4 (a+i a \tan (e+f x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^3/(a + I*a*Tan[e + f*x])^2,x]

[Out]

(Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*(((4*I)*c^3*f^3 + 6*c^2*d*f^2*(1 + (2*I)*f*x) + 6*c*d^2*f*(-I + 2*f*
x + (2*I)*f^2*x^2) + d^3*(-3 - (6*I)*f*x + 6*f^2*x^2 + (4*I)*f^3*x^3))*Cos[2*f*x] + (((32*I)*c^3*f^3 + 24*c^2*
d*f^2*(1 + (4*I)*f*x) + 12*c*d^2*f*(-I + 4*f*x + (8*I)*f^2*x^2) + d^3*(-3 - (12*I)*f*x + 24*f^2*x^2 + (32*I)*f
^3*x^3))*Cos[4*f*x]*(Cos[2*e] - I*Sin[2*e]))/32 + f^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3)*(Cos[2*e]
+ I*Sin[2*e]) + (4*c^3*f^3 + 6*c^2*d*f^2*(-I + 2*f*x) + 6*c*d^2*f*(-1 - (2*I)*f*x + 2*f^2*x^2) + d^3*(3*I - 6*
f*x - (6*I)*f^2*x^2 + 4*f^3*x^3))*Sin[2*f*x] + ((32*c^3*f^3 + 24*c^2*d*f^2*(-I + 4*f*x) + 12*c*d^2*f*(-1 - (4*
I)*f*x + 8*f^2*x^2) + d^3*(3*I - 12*f*x - (24*I)*f^2*x^2 + 32*f^3*x^3))*(Cos[2*e] - I*Sin[2*e])*Sin[4*f*x])/32
))/(16*f^4*(a + I*a*Tan[e + f*x])^2)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2045 vs. \(2 (224 ) = 448\).
time = 0.53, size = 2046, normalized size = 7.58

method result size
risch \(\frac {d^{3} x^{4}}{16 a^{2}}+\frac {d^{2} c \,x^{3}}{4 a^{2}}+\frac {3 d \,c^{2} x^{2}}{8 a^{2}}+\frac {c^{3} x}{4 a^{2}}+\frac {c^{4}}{16 a^{2} d}+\frac {i \left (4 d^{3} x^{3} f^{3}+12 c \,d^{2} f^{3} x^{2}-6 i d^{3} f^{2} x^{2}+12 c^{2} d \,f^{3} x -12 i c \,d^{2} f^{2} x +4 c^{3} f^{3}-6 i c^{2} d \,f^{2}-6 d^{3} f x -6 c \,d^{2} f +3 i d^{3}\right ) {\mathrm e}^{-2 i \left (f x +e \right )}}{16 f^{4} a^{2}}+\frac {i \left (32 d^{3} x^{3} f^{3}+96 c \,d^{2} f^{3} x^{2}-24 i d^{3} f^{2} x^{2}+96 c^{2} d \,f^{3} x -48 i c \,d^{2} f^{2} x +32 c^{3} f^{3}-24 i c^{2} d \,f^{2}-12 d^{3} f x -12 c \,d^{2} f +3 i d^{3}\right ) {\mathrm e}^{-4 i \left (f x +e \right )}}{512 f^{4} a^{2}}\) \(283\)
default \(\text {Expression too large to display}\) \(2046\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

1/a^2/f*(1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*x+e)^3+3/2*cos(f*x+e))*sin(f*x+e)+3/8*f*x+3/8*e)-3/32*
(f*x+e)^2+1/128*(2*cos(f*x+e)^2+3)^2)-6*I/f*c^2*d*(-1/4*(f*x+e)*cos(f*x+e)^4+1/16*(cos(f*x+e)^3+3/2*cos(f*x+e)
)*sin(f*x+e)+3/32*f*x+3/32*e)+2*c^3*(1/4*(cos(f*x+e)^3+3/2*cos(f*x+e))*sin(f*x+e)+3/8*f*x+3/8*e))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 270, normalized size = 1.00 \begin {gather*} \frac {{\left (32 i \, d^{3} f^{3} x^{3} + 32 i \, c^{3} f^{3} + 24 \, c^{2} d f^{2} - 12 i \, c d^{2} f - 3 \, d^{3} - 24 \, {\left (-4 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} - 12 \, {\left (-8 i \, c^{2} d f^{3} - 4 \, c d^{2} f^{2} + i \, d^{3} f\right )} x + 32 \, {\left (d^{3} f^{4} x^{4} + 4 \, c d^{2} f^{4} x^{3} + 6 \, c^{2} d f^{4} x^{2} + 4 \, c^{3} f^{4} x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 32 \, {\left (-4 i \, d^{3} f^{3} x^{3} - 4 i \, c^{3} f^{3} - 6 \, c^{2} d f^{2} + 6 i \, c d^{2} f + 3 \, d^{3} + 6 \, {\left (-2 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} + 6 \, {\left (-2 i \, c^{2} d f^{3} - 2 \, c d^{2} f^{2} + i \, d^{3} f\right )} x\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{512 \, a^{2} f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

1/512*(32*I*d^3*f^3*x^3 + 32*I*c^3*f^3 + 24*c^2*d*f^2 - 12*I*c*d^2*f - 3*d^3 - 24*(-4*I*c*d^2*f^3 - d^3*f^2)*x
^2 - 12*(-8*I*c^2*d*f^3 - 4*c*d^2*f^2 + I*d^3*f)*x + 32*(d^3*f^4*x^4 + 4*c*d^2*f^4*x^3 + 6*c^2*d*f^4*x^2 + 4*c
^3*f^4*x)*e^(4*I*f*x + 4*I*e) - 32*(-4*I*d^3*f^3*x^3 - 4*I*c^3*f^3 - 6*c^2*d*f^2 + 6*I*c*d^2*f + 3*d^3 + 6*(-2
*I*c*d^2*f^3 - d^3*f^2)*x^2 + 6*(-2*I*c^2*d*f^3 - 2*c*d^2*f^2 + I*d^3*f)*x)*e^(2*I*f*x + 2*I*e))*e^(-4*I*f*x -
 4*I*e)/(a^2*f^4)

________________________________________________________________________________________

Sympy [A]
time = 0.36, size = 665, normalized size = 2.46 \begin {gather*} \begin {cases} \frac {\left (\left (512 i a^{2} c^{3} f^{7} e^{2 i e} + 1536 i a^{2} c^{2} d f^{7} x e^{2 i e} + 384 a^{2} c^{2} d f^{6} e^{2 i e} + 1536 i a^{2} c d^{2} f^{7} x^{2} e^{2 i e} + 768 a^{2} c d^{2} f^{6} x e^{2 i e} - 192 i a^{2} c d^{2} f^{5} e^{2 i e} + 512 i a^{2} d^{3} f^{7} x^{3} e^{2 i e} + 384 a^{2} d^{3} f^{6} x^{2} e^{2 i e} - 192 i a^{2} d^{3} f^{5} x e^{2 i e} - 48 a^{2} d^{3} f^{4} e^{2 i e}\right ) e^{- 4 i f x} + \left (2048 i a^{2} c^{3} f^{7} e^{4 i e} + 6144 i a^{2} c^{2} d f^{7} x e^{4 i e} + 3072 a^{2} c^{2} d f^{6} e^{4 i e} + 6144 i a^{2} c d^{2} f^{7} x^{2} e^{4 i e} + 6144 a^{2} c d^{2} f^{6} x e^{4 i e} - 3072 i a^{2} c d^{2} f^{5} e^{4 i e} + 2048 i a^{2} d^{3} f^{7} x^{3} e^{4 i e} + 3072 a^{2} d^{3} f^{6} x^{2} e^{4 i e} - 3072 i a^{2} d^{3} f^{5} x e^{4 i e} - 1536 a^{2} d^{3} f^{4} e^{4 i e}\right ) e^{- 2 i f x}\right ) e^{- 6 i e}}{8192 a^{4} f^{8}} & \text {for}\: a^{4} f^{8} e^{6 i e} \neq 0 \\\frac {x^{4} \cdot \left (2 d^{3} e^{2 i e} + d^{3}\right ) e^{- 4 i e}}{16 a^{2}} + \frac {x^{3} \cdot \left (2 c d^{2} e^{2 i e} + c d^{2}\right ) e^{- 4 i e}}{4 a^{2}} + \frac {x^{2} \cdot \left (6 c^{2} d e^{2 i e} + 3 c^{2} d\right ) e^{- 4 i e}}{8 a^{2}} + \frac {x \left (2 c^{3} e^{2 i e} + c^{3}\right ) e^{- 4 i e}}{4 a^{2}} & \text {otherwise} \end {cases} + \frac {c^{3} x}{4 a^{2}} + \frac {3 c^{2} d x^{2}}{8 a^{2}} + \frac {c d^{2} x^{3}}{4 a^{2}} + \frac {d^{3} x^{4}}{16 a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**3/(a+I*a*tan(f*x+e))**2,x)

[Out]

Piecewise((((512*I*a**2*c**3*f**7*exp(2*I*e) + 1536*I*a**2*c**2*d*f**7*x*exp(2*I*e) + 384*a**2*c**2*d*f**6*exp
(2*I*e) + 1536*I*a**2*c*d**2*f**7*x**2*exp(2*I*e) + 768*a**2*c*d**2*f**6*x*exp(2*I*e) - 192*I*a**2*c*d**2*f**5
*exp(2*I*e) + 512*I*a**2*d**3*f**7*x**3*exp(2*I*e) + 384*a**2*d**3*f**6*x**2*exp(2*I*e) - 192*I*a**2*d**3*f**5
*x*exp(2*I*e) - 48*a**2*d**3*f**4*exp(2*I*e))*exp(-4*I*f*x) + (2048*I*a**2*c**3*f**7*exp(4*I*e) + 6144*I*a**2*
c**2*d*f**7*x*exp(4*I*e) + 3072*a**2*c**2*d*f**6*exp(4*I*e) + 6144*I*a**2*c*d**2*f**7*x**2*exp(4*I*e) + 6144*a
**2*c*d**2*f**6*x*exp(4*I*e) - 3072*I*a**2*c*d**2*f**5*exp(4*I*e) + 2048*I*a**2*d**3*f**7*x**3*exp(4*I*e) + 30
72*a**2*d**3*f**6*x**2*exp(4*I*e) - 3072*I*a**2*d**3*f**5*x*exp(4*I*e) - 1536*a**2*d**3*f**4*exp(4*I*e))*exp(-
2*I*f*x))*exp(-6*I*e)/(8192*a**4*f**8), Ne(a**4*f**8*exp(6*I*e), 0)), (x**4*(2*d**3*exp(2*I*e) + d**3)*exp(-4*
I*e)/(16*a**2) + x**3*(2*c*d**2*exp(2*I*e) + c*d**2)*exp(-4*I*e)/(4*a**2) + x**2*(6*c**2*d*exp(2*I*e) + 3*c**2
*d)*exp(-4*I*e)/(8*a**2) + x*(2*c**3*exp(2*I*e) + c**3)*exp(-4*I*e)/(4*a**2), True)) + c**3*x/(4*a**2) + 3*c**
2*d*x**2/(8*a**2) + c*d**2*x**3/(4*a**2) + d**3*x**4/(16*a**2)

________________________________________________________________________________________

Giac [A]
time = 0.59, size = 383, normalized size = 1.42 \begin {gather*} \frac {{\left (32 \, d^{3} f^{4} x^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 128 \, c d^{2} f^{4} x^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 192 \, c^{2} d f^{4} x^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 128 i \, d^{3} f^{3} x^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 32 i \, d^{3} f^{3} x^{3} + 128 \, c^{3} f^{4} x e^{\left (4 i \, f x + 4 i \, e\right )} + 384 i \, c d^{2} f^{3} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 96 i \, c d^{2} f^{3} x^{2} + 384 i \, c^{2} d f^{3} x e^{\left (2 i \, f x + 2 i \, e\right )} + 192 \, d^{3} f^{2} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 96 i \, c^{2} d f^{3} x + 24 \, d^{3} f^{2} x^{2} + 128 i \, c^{3} f^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 384 \, c d^{2} f^{2} x e^{\left (2 i \, f x + 2 i \, e\right )} + 32 i \, c^{3} f^{3} + 48 \, c d^{2} f^{2} x + 192 \, c^{2} d f^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - 192 i \, d^{3} f x e^{\left (2 i \, f x + 2 i \, e\right )} + 24 \, c^{2} d f^{2} - 12 i \, d^{3} f x - 192 i \, c d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - 12 i \, c d^{2} f - 96 \, d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - 3 \, d^{3}\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{512 \, a^{2} f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x, algorithm="giac")

[Out]

1/512*(32*d^3*f^4*x^4*e^(4*I*f*x + 4*I*e) + 128*c*d^2*f^4*x^3*e^(4*I*f*x + 4*I*e) + 192*c^2*d*f^4*x^2*e^(4*I*f
*x + 4*I*e) + 128*I*d^3*f^3*x^3*e^(2*I*f*x + 2*I*e) + 32*I*d^3*f^3*x^3 + 128*c^3*f^4*x*e^(4*I*f*x + 4*I*e) + 3
84*I*c*d^2*f^3*x^2*e^(2*I*f*x + 2*I*e) + 96*I*c*d^2*f^3*x^2 + 384*I*c^2*d*f^3*x*e^(2*I*f*x + 2*I*e) + 192*d^3*
f^2*x^2*e^(2*I*f*x + 2*I*e) + 96*I*c^2*d*f^3*x + 24*d^3*f^2*x^2 + 128*I*c^3*f^3*e^(2*I*f*x + 2*I*e) + 384*c*d^
2*f^2*x*e^(2*I*f*x + 2*I*e) + 32*I*c^3*f^3 + 48*c*d^2*f^2*x + 192*c^2*d*f^2*e^(2*I*f*x + 2*I*e) - 192*I*d^3*f*
x*e^(2*I*f*x + 2*I*e) + 24*c^2*d*f^2 - 12*I*d^3*f*x - 192*I*c*d^2*f*e^(2*I*f*x + 2*I*e) - 12*I*c*d^2*f - 96*d^
3*e^(2*I*f*x + 2*I*e) - 3*d^3)*e^(-4*I*f*x - 4*I*e)/(a^2*f^4)

________________________________________________________________________________________

Mupad [B]
time = 3.23, size = 289, normalized size = 1.07 \begin {gather*} {\mathrm {e}}^{-e\,2{}\mathrm {i}-f\,x\,2{}\mathrm {i}}\,\left (\frac {\left (4\,c^3\,f^3-c^2\,d\,f^2\,6{}\mathrm {i}-6\,c\,d^2\,f+d^3\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{16\,a^2\,f^4}+\frac {d^3\,x^3\,1{}\mathrm {i}}{4\,a^2\,f}-\frac {d\,x\,\left (-2\,c^2\,f^2+c\,d\,f\,2{}\mathrm {i}+d^2\right )\,3{}\mathrm {i}}{8\,a^2\,f^3}-\frac {d^2\,x^2\,\left (-2\,c\,f+d\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{8\,a^2\,f^2}\right )+{\mathrm {e}}^{-e\,4{}\mathrm {i}-f\,x\,4{}\mathrm {i}}\,\left (\frac {\left (32\,c^3\,f^3-c^2\,d\,f^2\,24{}\mathrm {i}-12\,c\,d^2\,f+d^3\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{512\,a^2\,f^4}+\frac {d^3\,x^3\,1{}\mathrm {i}}{16\,a^2\,f}-\frac {d\,x\,\left (-8\,c^2\,f^2+c\,d\,f\,4{}\mathrm {i}+d^2\right )\,3{}\mathrm {i}}{128\,a^2\,f^3}-\frac {d^2\,x^2\,\left (-4\,c\,f+d\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{64\,a^2\,f^2}\right )+\frac {c^3\,x}{4\,a^2}+\frac {d^3\,x^4}{16\,a^2}+\frac {3\,c^2\,d\,x^2}{8\,a^2}+\frac {c\,d^2\,x^3}{4\,a^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)^3/(a + a*tan(e + f*x)*1i)^2,x)

[Out]

exp(- e*2i - f*x*2i)*(((d^3*3i + 4*c^3*f^3 - c^2*d*f^2*6i - 6*c*d^2*f)*1i)/(16*a^2*f^4) + (d^3*x^3*1i)/(4*a^2*
f) - (d*x*(d^2 - 2*c^2*f^2 + c*d*f*2i)*3i)/(8*a^2*f^3) - (d^2*x^2*(d*1i - 2*c*f)*3i)/(8*a^2*f^2)) + exp(- e*4i
 - f*x*4i)*(((d^3*3i + 32*c^3*f^3 - c^2*d*f^2*24i - 12*c*d^2*f)*1i)/(512*a^2*f^4) + (d^3*x^3*1i)/(16*a^2*f) -
(d*x*(d^2 - 8*c^2*f^2 + c*d*f*4i)*3i)/(128*a^2*f^3) - (d^2*x^2*(d*1i - 4*c*f)*3i)/(64*a^2*f^2)) + (c^3*x)/(4*a
^2) + (d^3*x^4)/(16*a^2) + (3*c^2*d*x^2)/(8*a^2) + (c*d^2*x^3)/(4*a^2)

________________________________________________________________________________________